<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateCatsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('cats', function (Blueprint $table) {
            $table->increments('id');
            $table->string('catname')->comment('分类名称');
            $table->Integer('type')->comment('总分类,0:风格');
            $table->tinyInteger('level')->comment('1级，2级，3级');
            $table->tinyInteger('is_show')->comment('1展示，0隐藏');
            $table->integer('father_id')->comment('父级ID');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('cats');
    }
}
